var PGRY_KFGS = ["item_dev", "item_test"]; //开发公司
var domainid = getDomainid();
var param = getMainAndMiniSystemsInParam();
var resultStr = getAssessPeople(domainid, param, PGRY_KFGS);
var fzr = getItemValueAsString("dzxqdfzr");
var sqr = getItemValueAsString("sqr");
var fzrArray = splitText(fzr, ";");
for (var i = 0; i < fzrArray.length; i++) {
    var user = fzrArray[i];
    if (isNotNull(user)) {
        resultStr = resultStr + "," + user + ",I40288821194e875f0152443f0c470a62,zhouzhaoxin";
    }
}
resultStr = resultStr + "," + sqr + ",tangwenyan" + ",zhangye";
var set = createObject("java.util.HashSet");
var list = createObject("java.util.ArrayList");
var userArray = splitText(resultStr, ",");
for (var i = 0; i < userArray.length; i++) {
    var u = userArray[i];
    if (isNotNull(u)) {
        set.add(u);
    }
}
if (set.size() > 0) {
    var iter = set.iterator();
    while (iter.hasNext()) {
        list.add(iter.next());
    }
}
list;



/**
 * 获取评估人员
 * @param domainid 
 * @param param 
 * @param array 
 */
function getAssessPeople(domainid, param, array) {
    var resultStr = "";
    if (null != array && array.length > 0) {
        var sql = " select replace( ";
        if (array.length == 1) {
            sql = sql + " group_concat(" + array[0];
        } else {
            sql = sql + " concat ( group_concat(" + array[0] + ")";
            for (var i = 1; i < array.length; i++) {
                sql = sql + " , ',', group_concat(" + array[i] + ")";
            }
        }
        sql = sql + "), ';', ',') as item_data, '" + domainid + "' as domainid from tlk_system_manager where " +
            "(case when (item_system_son is null or item_system_son = '')" +
            "then (item_system) else concat(item_system, '_', item_system_son) end ) " +
            "in ( '" + param + "' )";
        var result = findBySQL(sql);
        if (null != result) {
            resultStr = result.getItemValueAsString("data");
        }
    }
    return resultStr;
}

/**
 * @returns 主配系统通过 “','” 符号连接的字符串
 */
function getMainAndMiniSystemsInParam() {
    var nameStr = "";
    var mainSys = getItemValueAsString("ztxt_mc"); //1. 获取主系统名称
    nameStr = nameStr + mainSys;
    var viceSysNameArray = splitText(getItemValueAsString("phxt_mc"), ";"); //2. 获取配合系统名称
    if ((null != viceSysNameArray) && (viceSysNameArray.length > 0)) { //3. 整合
        for (var i = 0; i < viceSysNameArray.length; i++) {
            nameStr += "','" + viceSysNameArray[i];
        }
    }
    var param = nameStr;
    return param;
}